<#import "/META-INF/spring.ftl" as spring />
<#import "/META-INF/mspring.ftl" as mspring />
<#import "../../space_macro.ftl" as space />
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${spaceUser.alias}的个人主页</title>
<link media="all" href="${base}/u/style/alice.css" rel="stylesheet">
<link media="all" href="${base}/u/style/uc.css" rel="stylesheet">
</head>

<body>
	<div class="bg" style="background-color:#f9f9f9;"><#--<img src="${base}/u/images/bg.jpg" />--></div>
    <div id="main-body" class="wrapper-990">
		<div id="main-header" class="ui-grid-row">
			<div class="ui-grid-25">
				<div class="header">
					<h2><a href="#">雾非雾的情思</a> <sup>人有多大胆，地有多大产！</sup></h2>
					<div class="nav">
						<ul>
							<li>个人首页</li>
							<li>唠叨</li>
							<li>文章</li>
							<li>管理</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="space-top-10"></div>
		<div id="main-content" class="ui-grid-row">
			<div class="ui-grid-6">
				<div class="ui-box margin-bottom-10">
					<div class="ui-box-head">
						<div class="ui-box-head-border">
							<h3 class="ui-box-head-title">博客管理</h3>
						</div>
					</div>
					<div class="ui-box-container">
						<div class="ui-box-content nav-side-content">
							<ul class="nav-side-ul">
								<li class="nav-side-item"><a href="#">发表文章</a></li>
								<li class="nav-side-item"><a href="#">草稿箱</a></li>
								<li class="nav-side-item"><a href="${spaceUrl}/admin/post/list">文章管理</a></li>
								<li class="nav-side-item"><a href="#">评论管理</a></li>
								<li class="nav-side-item"><a href="#">评论管理</a></li>
								<li class="nav-side-item"><a href="#">个人资料</a></li>
						  	</ul>
						</div>
					</div>
				</div>
				<div class="ui-box margin-bottom-10">
					<div class="ui-box-head">
						<div class="ui-box-head-border">
							<h3 class="ui-box-head-title">个人信息管理</h3>
						</div>
					</div>
					<div class="ui-box-container">
						<div class="ui-box-content nav-side-content">
							<ul class="nav-side-ul">
								<li class="nav-side-item"><a href="#">个人资料</a></li>
								<li class="nav-side-item"><a href="#">修改登录密码</a></li>
								<li class="nav-side-item"><a href="#">修改个人头像</a></li>
						  	</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="ui-grid-19">
				<div class="ui-table-container">
					<form name="postForm" id="postForm" action="${spaceUrl}/admin/post/list" method="GET">
						<@spring.bind "postPage" />
						<!-- pagination parameter -->
						<@spring.formHiddenInput path="postPage.pageNo" />
						<@spring.formHiddenInput path="postPage.totalPages" />
						<@spring.formHiddenInput path="postPage.totalCount" />
						<!-- sorter parameter -->
						<@spring.formHiddenInput path="postPage.sortEnable" />
						<@spring.formHiddenInput path="postPage.sort.field" />
						<@spring.formHiddenInput path="postPage.sort.order" />
					    <table class="ui-table" style="background-color:#fff;">
					        <thead>
					            <tr>
					                <th>标题</th>
					                <th>分类</th>
					                <th>创建时间</th>
					                <th>是否置顶</th>
					                <th>操作</th>
					            </tr>
					        </thead>
					        <tbody>
					        	<#if (postPage?exists && postPage.result?size > 0)>
						        	<#list postPage.result as post>
							        	<tr>
							                <td>${post.title}</td>
							                <td><#if (post.catalogs?exists && post.catalogs?size > 0)><#list post.catalogs as catalog>${catalog.name}&nbsp;</#list></#if></td>
							                <td>${post.createTime}</td>
							                <td><#if post.isTop>是<#else>否</#if> </td>
							                <td>修改</td>
							            </tr>
						        	</#list>
					        	</#if>
					        </tbody>
					        <tfoot>
					            <tr>
					                <td colspan="5">
					                	<#if (postPage.totalPages > 1)>
					                        <@space.pagenavi pageEntity=postPage baseUrl=spaceUrl + "/admin/post/list?pageNo=$page$" />
					                    </#if>
					                </td>
					            </tr>
					        </tfoot>
					    </table>
					</form>
				</div>
			</div>
		</div>
		<div class="clearfix"></div>
	</div>
</body>
</html>